Trailing edge detector using current collapse

ABSTRACT

A controller for a power converter compares a voltage sense signal to a first reference and compares a current sense signal to a current sense signal. The voltage sense signal is representative of an input voltage of the power converter. The current sense signal is representative of a current through the power converter. A slope of the voltage sense signal is measured over time. An edge detection is asserted by the controller when (1) the voltage sense signal is larger than the first reference, (2) the current sense signal is lower than the second reference, and (3) the slope is a negative slope.

BACKGROUND INFORMATION

1. Field of the Disclosure

The present invention relates generally to power converters, and morespecifically to power converters utilized with dimmer circuits.

2. Background

Residential and commercial lighting applications often include dimmersvary the brightness of the outputted light. A dimmer circuit typicallydisconnects a portion of the ac input voltage to limit the amount ofvoltage and current supplied to an incandescent lamp. This is known asphase dimming because it is often convenient to designate the positionof the dimmer circuit and the resultant amount of missing voltage interms of a fraction of the period of the ac input voltage measured indegrees. In general, the ac input voltage is a sinusoidal waveform andthe period of the ac input voltage is referred to as a full line cycle.As such, half the period of the ac input voltage is referred to as ahalf line cycle. An entire period has 360 degrees, and a half line cyclehas 180 degrees. Typically, the phase angle is a measure of how manydegrees (from a reference of zero degrees) of each half line cycle thedimmer circuit disconnects. On the other hand, the conduction angle is ameasure of how many degrees (from a reference of zero degrees) of eachhalf line cycle the dimmer circuit does not disconnect a portion the acinput voltage. Or in other words, the conduction angle is a measure ofhow many degrees of each half line cycle in which the dimmer circuit isconducting. In one example, the removal of a quarter of the ac inputvoltage in a half line cycle may correspond to a phase angle of 45degrees but a conduction angle of 135 degrees.

Although phase angle dimming works well with incandescent lamps thatreceive the altered ac input voltage directly, it typically createsproblems for light emitting diode (LED) lamps. LED lamps often require aregulated power converter to provide regulated current and voltage fromthe ac power line. Most LEDs and LED modules are best driven by aregulated current which a regulated power converter may provide from anac power line. Dimmer circuits typically don't work well withconventional regulated power converters and their respectivecontrollers. Regulated power converters are typically designed to ignoredistortions of the ac input voltage and to deliver a constant regulatedoutput. As such, conventional regulated power supplies would notsatisfactorily dim the LED lamp. Unless a power converter for an LEDlamp is specially designed to recognize and respond to the voltage froma dimmer circuit in a desirable way, a dimmer is likely to produceunacceptable results such as flickering or shimmering of the LED lampwith large conduction angles and flashing of the LED lamp at lowconduction angles.

BRIEF DESCRIPTION OF THE DRAWINGS

Non-limiting and non-exhaustive embodiments of the present invention aredescribed with reference to the following figures, wherein likereference numerals refer to like parts throughout the various viewsunless otherwise specified.

FIG. 1 is a functional block diagram illustrating an example powerconverter with a dimmer circuit utilizing a controller in accordancewith an example of the present invention.

FIG. 2 is a diagram illustrating example waveforms of an ac inputvoltage, an output voltage of a dimmer circuit, and an output of arectifier circuit of FIG. 1 in accordance with an example of the presentinvention.

FIG. 3 is a diagram illustrating example waveforms of an input voltagewaveform, a zero crossing signal, an input current waveform, and an edgesignal of the power converter of FIG. 1 in accordance with an example ofthe present invention.

FIG. 4 is a flow diagram illustrating an example method for determininga trailing edge in an input waveform in accordance with an example ofthe present invention.

FIG. 5 is a functional block diagram of an example controller inaccordance with an example of the present invention.

Corresponding reference characters indicate corresponding componentsthroughout the several views of the drawings. Skilled artisans willappreciate that elements in the figures are illustrated for simplicityand clarity and have not necessarily been drawn to scale. For example,the dimensions of some of the elements in the figures may be exaggeratedrelative to other elements to help to improve understanding of variousembodiments of the present invention. Also, common but well-understoodelements that are useful or necessary in a commercially feasibleembodiment are often not depicted in order to facilitate a lessobstructed view of these various embodiments of the present invention.

DETAILED DESCRIPTION

Embodiments of a power converter controller and a method of operatingthe power converter controller are described herein. In the followingdescription, numerous specific details are set forth in order to providea thorough understanding of the present invention. It will be apparent,however, to one having ordinary skill in the art that the specificdetail need not be employed to practice the present invention. In otherinstances, well-known materials or methods have not been described indetail in order to avoid obscuring the present invention.

Reference throughout this specification to “one embodiment”, “anembodiment”, “one example” or “an example” means that a particularfeature, structure or characteristic described in connection with theembodiment or example is included in at least one embodiment of thepresent invention. Thus, appearances of the phrases “in one embodiment”,“in an embodiment”, “one example” or “an example” in various placesthroughout this specification are not necessarily all referring to thesame embodiment or example. Furthermore, the particular features,structures or characteristics may be combined in any suitablecombinations and/or subcombinations in one or more embodiments orexamples. Particular features, structures or characteristics may beincluded in an integrated circuit, an electronic circuit, acombinational logic circuit, or other suitable components that providethe described functionality. In addition, it is appreciated that thefigures provided herewith are for explanation purposes to personsordinarily skilled in the art and that the drawings are not necessarilydrawn to scale.

For phase dimming applications, including those for light emittingdiodes (LED), a dimmer circuit typically disconnects a portion of the acinput voltage at every half line cycle to limit the amount of voltageand current supplied to the LEDs. Dimmer circuits may be categorized asa leading edge dimmer circuit or a trailing edge dimmer circuit. For aleading edge dimmer circuit, in general the input voltage issubstantially zero at the beginning of a half line cycle until thedimmer circuit conducts and the input voltage rapidly increases andfollows the ac input voltage. For a trailing edge dimmer circuit, theinput voltage substantially follows the ac input voltage at thebeginning of the half line cycle until the dimmer circuit does notconduct and the input voltage rapidly decreases to substantially zero.The rapid increase or decrease may be referred to as an “edge.”

A power converter designed to respond to a dimmer circuit may determinethe amount of dimming set by the dimmer circuit and control the amountof voltage and current supplied to the LEDs. The amount of dimming (i.e.phase angle or conduction angle) may be determined by measuring theamount of time which the ac input voltage is disconnected or notdisconnected (i.e., the amount of time which the dimmer circuit is notconducting or conducting, respectively). In one example, the conductionangle (or phase angle) may be measured by threshold detection where theinput voltage may be compared to a reference threshold. The amount oftime which the input voltage is above the reference may correspond tothe conduction while the amount of time which the input voltage is belowthe reference may correspond to the phase angle. However, utilizingthreshold detection may be inaccurate due to leakage current of thedimmer circuit in its off-state that prevents voltage across the powerconverter input capacitors to fall to substantially zero.

In one example of the present invention, an edge detection circuit maybe utilized to determine if the dimmer circuit is not conducting. Oncean edge is detected, the conduction angle (or phase angle) may bemeasured. For examples of the present invention, the edge detectioncircuit may determine if a trailing edge is detected if the inputvoltage is greater than a reference voltage, the input current is lessthan a reference current, and the bleeder circuit is enabled. Inaddition, the trailing edge is detected if the amplitude of the inputvoltage has a negative slope.

Referring first to FIG. 1, a functional block diagram of an examplepower converter 100 is illustrated including ac input voltage V_(AC)102, a dimmer circuit 104, a dimmer output voltage V_(DO) 106, arectifier 108, a bleeder circuit 109, an input voltage V_(IN) 110, adiode 111, an energy transfer element T1 112, a primary winding 114 ofthe energy transfer element T1 112, a secondary winding 116 of theenergy transfer element T1 112, an input current I_(IN) 115, a switch S1118, input return 117, a clamp circuit 120, a rectifier D1 122, an inputcapacitor C_(F) 121, an output capacitor C1 124, a load 126, a sensecircuit 128, and a controller 130. Controller 130 further includes adrive circuit 132, a bleeder control circuit 134, and an edge detectioncircuit 136. Bleeder circuit 109 further includes resistance 138 andswitch 140. In one example, sense circuit 128 may also be included incontroller 130. FIG. 1 further illustrates an input voltage sense signal142, an input current sense signal 144, output voltage V_(O) 146, anoutput current I_(O) 148, an output quantity U_(O) 150, a feedbacksignal U_(FB) 152, a switch current ID 156, a switch current sensesignal 158, an enable signal U_(EN) 160, and an edge signal U_(EDGE)164. Although a single controller is illustrated in FIG. 1, it should beappreciated that multiple controllers may be utilized. In addition, thedrive circuit 132, bleeder control circuit 134, and edge detectioncircuit 136 need not be within a single controller. For example, thepower converter 100 may have a primary and a secondary controllercoupled to the input and the output side, respectively, of the powerconverter 100. The example switched mode power converter 100 illustratedin FIG. 1 is coupled in a flyback configuration, which is just oneexample of a switched mode power converter that may benefit from theteachings of the present invention. It is appreciated that other knowntopologies and configurations of the switched mode power converter mayalso benefit from the teachings of the present invention.

The power converter 100 provides output power to the load 126 from anunregulated ac input voltage V_(AC) 102. As shown, dimmer circuit 104receives the ac input voltage V_(AC) 102 and produces the dimmer outputvoltage V_(DO) 106. The dimmer circuit 104 may be utilized to limit thevoltage delivered to the power converter 100. In one embodiment, thedimmer circuit 104 may be a phase dimming circuit such as a triac phasedimmer. The dimmer circuit 104 further couples to the rectifier 108 andthe dimmer output voltage V_(DO) 106 is received by the rectifier 108.The rectifier 108 outputs the input voltage V_(IN) 110. In oneembodiment, rectifier 108 may be a bridge rectifier. The rectifier 108further couples to the bleeder circuit 109 and the diode 111. The otherend of diode 111 is further coupled to the energy transfer element T1112. In some embodiments of the present invention, the energy transferelement T1 112 may be a coupled inductor or may be a transformer. Asshown, the energy transfer element T1 112 includes two windings, aprimary winding 114 and a secondary winding 116. However, the energytransfer element T1 112 may have more than two windings. The primarywinding 114 may be considered an input winding, and secondary winding116 may be considered an output winding. The primary winding 114 isfurther coupled to switch S1 118, which is then further coupled to inputreturn 117. The clamp circuit 120 is illustrated in the example of FIG.1 as being coupled across the primary winding 114 of the energy transferelement T1 112. The filter capacitor C_(F) 121 may couple across theprimary winding 114 and switch S1 118. In other words, the filtercapacitor C_(F) 121 may be coupled across the diode 111 and the bleedercircuit 109. As illustrated, the bleeder circuit may include aresistance 138 and a switch 140. The resistance 138 is coupled to thediode 111 while the switch 140 is coupled to input return 117.

Secondary winding 116 of the energy transfer element T1 112 is coupledto the rectifier D1 122. In the example of FIG. 1, the rectifier D1 122is exemplified as a diode. However, in some examples the rectifier D1122 may be a transistor used as a synchronous rectifier. Both the outputcapacitor C1 124 and the load 126 are shown in FIG. 1 as being coupledto the rectifier D1 122. An output is provided to the load 126 and maybe provided as either a regulated output voltage V_(O) 146, regulatedoutput current I_(O) 148, or a combination of the two. In oneembodiment, the load 126 may be a light emitting diode (LED) array.

The power converter 100 further comprises circuitry to regulate theoutput, exemplified as output quantity U_(O) 150. In general, the outputquantity U_(O) 150 is either an output voltage V_(O) 146, an outputcurrent I_(O) 148, or a combination of the two. A sense circuit 128 iscoupled to sense the output quantity U_(O) 150 and to provide feedbacksignal U_(FB) 152, which is representative of the output quantity U_(O)150. Feedback signal U_(FB) 152 may be a voltage signal or a currentsignal. In one example, the sense circuit 128 may sense the outputquantity U_(O) 150 from an additional winding included in the energytransfer element T1 112. In a further example, the sense circuit 128 mayutilize a voltage divider to sense the output quantity U_(O) 150 fromthe output of the power converter 100.

Controller 130 is coupled to the sense circuit 128 and receives thefeedback signal U_(FB) 152. The controller 130 further includesterminals for receiving the input voltage sense signal 142(representative of the input voltage V_(IN) 110), input current sensesignal 144 (which is representative of the input current I_(IN) 115),switch current sense signal 158 (representative of the switch current ID156) and for providing the drive signal 170 to power switch S1 118. Inthe example of FIG. 1, the input voltage sense signal 142 isrepresentative of input voltage V_(IN) 110. However, in other examplesthe input voltage sense signal 142 may be representative of the dimmeroutput voltage V_(DO) 106. The input voltage sense signal 142, inputcurrent sense signal 144, and the switch current sense signal 158 may bevoltage signals or current signals. Controller 130 provides drive signal170 to the power switch S1 118 to control various switching parametersto control the transfer of energy from the input of power converter 100to the output of power converter 100. The controller 130 also providesthe bleeder control signal U_(BLEED) 162 to switch 140 to control whenthe bleeder circuit 109 provides bleeding for the power converter 100.

As illustrated in the example of FIG. 1, the controller 130 includes thedrive circuit 132, bleeder control circuit 134, and the edge detectioncircuit 136. The drive circuit is coupled to output the drive signal 170in response to the one or more outputs of the edge detection circuit 136and/or the feedback signal U_(FB) 152. In addition, drive circuit 132may also be coupled to be responsive to the current sense signal 158.Bleeder control circuit 134 is coupled to receive the input voltagesense signal 142, input current sense signal 144, and output the bleedercontrol signal U_(BLEED) 162. In addition, the bleeder control circuit134 also outputs an enable signal U_(EN) 160 to the edge detectioncircuit 136. The enable signal U_(EN) 160 may be a voltage signal or acurrent signal and is representative of when the bleeder circuit 109 isenabled. Edge detection circuit 136 is coupled to receive the inputvoltage sense signal 142, input current sense signal 144, and the enablesignal U_(EN) 160 and output the edge signal U_(EDGE) 164. The edgesignal U_(EDGE) 164 may be a voltage signal or a current signal and isrepresentative of whether an edge is detected. In particular, if atrailing edge is detected.

In operation, the power converter 100 of FIG. 1 provides output power tothe load 126 from an unregulated input (i.e. ac input voltage V_(AC)102). The dimmer circuit 104 may be utilized to limit the amount ofvoltage delivered to the power converter. For the example of a LED load,when the dimmer circuit 104 limits the amount of voltage delivered tothe power converter, the resultant current delivered to the load of LEDarrays is also limited and the LED array dims. For leading edge dimming,the dimmer circuit 104 disconnects the ac input voltage V_(AC) 102 whenthe ac input voltage V_(AC) 102 crosses zero voltage. After a givenamount of time, the dimmer circuit 104 reconnects the ac input voltageV_(AC) 102 with the power converter 100. The amount of time before thedimmer circuit reconnects the ac input voltage V_(AC) 102 is set by auser. For trailing edge dimming, the dimmer circuit 104 connects theinput to the power converter when the ac input voltage V_(AC) 102crosses zero voltage. After a given amount of time set by a user, thedimmer circuit 104 then disconnects the ac input voltage V_(AC) 102 forthe remainder of the half cycle. Depending on the amount of dimmingwanted the dimmer circuit 104 controls the amount of time the ac inputvoltage V_(AC) 102 is disconnected from the power converter. In general,the more dimming desired corresponds to a longer period of time duringwhich the dimming circuit 104 disconnects the ac input voltage V_(AC)102.

The dimmer circuit 104 produces the dimmer output voltage V_(DO) 106which is received and rectified by rectifier 108. The result is theinput voltage V_(IN) 110. The filter capacitor C_(F) 121 filters thehigh frequency current from the switch S1 118. Diode 111 is coupled as ablocking diode to prevent current from flowing from the filter capacitorC_(F) 121 to the bleeder circuit 109. In general, when the dimmercircuit 104 is conducting, the current through the dimmer circuit 104 isheld above a threshold. The bleeder circuit 109 provides additionalcurrent to keep the current through the dimmer circuit 104 above thethreshold. In another example, the current through the dimmer circuit104 is held above the threshold to provide sufficient loading currentfor the dimmer circuit 104. The resistance 138 may provide additionalcurrent when the bleeder circuit 109 is enabled and the switch 140 ison. It is generally understood that a switch that is closed may conductcurrent and is considered on, while a switch that is open cannot conductcurrent and is considered off. Switch 140 is opened and closed inresponse to the bleed control signal U_(BLEED) 162.

The switching power converter 100 utilizes the energy transfer elementT1 112 to transfer voltage between the primary 114 and the secondary 116windings. The clamp circuit 120 is coupled to the primary winding 114 tolimit the maximum voltage on the switch S1 118. Switch S1 118 is openedand closed in response to the drive signal 170. In one example, theswitch S1 118 (and switch 140) may be a transistor such as ametal-oxide-semiconductor field-effect transistor (MOSFET). In anotherexample, controller 130 may be implemented as a monolithic integratedcircuit or may be implemented with discrete electrical components or acombination of discrete and integrated components. Controller 130 andswitch S1 118 could form part of an integrated circuit that ismanufactured as either a hybrid or monolithic integrated circuit. Inoperation, the switching of the switch S1 118 produces a pulsatingcurrent at the rectifier D1 122. The current in the rectifier D1 122 isfiltered by the output capacitor C1 124 to produce a substantiallyconstant output voltage V_(O) 146, output current I_(O) 148, or acombination of the two at the load 126.

The sense circuit 128 senses the output quantity U_(O) 150 of the powerconverter 100 to provide the feedback signal U_(FB) 152 to thecontroller 130. The feedback signal U_(FB) 152 provides informationregarding the output quantity U_(O) 150 to the controller 130. The drivecircuit 132 controls various switching parameters (such as switchon-time, switch off-time, duty ratio, or the number of pulses per unittime) of the switch S1 118 through the drive signal 170 in response tothe feedback signal U_(FB) 152 and the edge signal U_(EDGE) 164. Thedrive circuit 132 may also alter the drive signal 170 in response to theswitch current sense signal 158. The switch current ID 156 and the inputcurrent I_(IN) 115 may be sensed in a variety of ways, such as forexample the voltage across a discrete resistor or the voltage across atransistor when the transistor is conducting. In addition, thecontroller 130 may receive the input voltage sense signal 142 and theinput voltage V_(IN) 110 may be sensed through a resistor divider.

Bleeder control circuit 134 is coupled to output the bleeder controlsignal U_(BLEED) 162 in response to the input voltage sense signal 142and the input current sense signal 144. The enable signal U_(EN) 160 isgenerated in response to the input voltage sense signal 142. Edgedetection circuit 136 is coupled to output the edge signal U_(EDGE) 164in response to the input voltage sense signal 142, input current sensesignal 144, and the enable signal U_(EN) 160 if an edge is detected.

FIG. 2 illustrates example waveforms of an ac input voltage 202, adimmer output voltage V_(DO) 206, and an input voltage V_(IN) 210. Inparticular, FIG. 2 illustrates the dimmer output voltage V_(DO) 206 andresultant input voltage V_(IN) 210 for trailing edge dimming.

In general, the ac input voltage V_(AC) 202 is a sinusoidal waveformwith the period of the ac input voltage V_(AC) 202 referred to as a fullline cycle T_(FL) 211. Mathematically: V_(AC)=V_(P) sin(2πf_(L)t). WhereV_(P) 207 is the peak voltage of the ac input voltage V_(AC) and f_(L)is the frequency of the ac input voltage. It should be appreciated thatthe full line cycle T_(FL) 211 is the reciprocal of the line frequencyf_(L), or mathematically:

$T_{FL} = {\frac{1}{f_{L}}.}$As shown in FIG. 2, a full line cycle T_(HL) 211 of the ac input voltage202 is denoted as the length of time between every other zero-crossingof the ac input voltage 202. Further, the half line cycle T_(HL) 213 isthe reciprocal of double the line frequency, or mathematically:

$T_{HL} = {\frac{1}{2f_{L}}.}$As shown, the half line cycle T_(HL) 213 of the ac input voltage V_(AC)202 is denoted as the length of time between consecutive zero-crossings.

For trailing edge dimming, the ac input voltage V_(AC) 202 is connectedto the power converter at the beginning of each half line cycle T_(HL)213 and the dimmer output voltage V_(DO) 206 substantially follows theac input voltage V_(AC) 202. After a given amount of time, the dimmercircuit 104 disconnects the ac input voltage V_(AC) 202 from the powerconverter 100 and the dimmer output voltage V_(DO) 206 is substantiallyequal to zero for the rest of the half line cycle T_(HL) 213. Therectifier circuit 108 rectifies the dimmer output voltage V_(DO) 206thus providing the input voltage V_(IN) 210 as shown. Or mathematically:V_(RECT)=|V_(DO)|. As shown the dimmer output voltage V_(DO) 206 sharplyincreases (or decreases) to substantially fall to zero. The sharpdecrease is also illustrated in the example waveform of the inputvoltage V_(IN) 210. The sharp decrease may be referred to as the “edge.”

Referring next to FIG. 3, example waveforms of the input voltage V_(IN)310, input current I_(IN) 315, enable signal U_(EN) 360, and the edgesignal U_(EDGE) 364 of the switching power converter 100 are illustratedincluding a first reference V_(REF) 372, a threshold I_(H) _(—) _(TH)376, a second reference I_(REF) 377, times t₁ 374 and t₂ 375, and timethreshold T_(TH) 378. FIG. 3 illustrates one half line cycle T_(HL) 313of the input voltage V_(IN) 310 and input current I_(IN) 315 when thedimmer circuit is disconnecting a portion of the ac input voltage V_(AC)102 from the power converter 100 utilizing a trailing edge dimmercircuit.

Input voltage V_(IN) 310 substantially follows the sinusoidal shape ofthe ac input voltage at the beginning of the half line cycle T_(HL) 313.At time t₁ 374, the dimmer circuit 104 disconnects the ac input voltagefrom the power converter and the input voltage V_(IN) 310 falls tosubstantially zero. Threshold detection may be utilized to determinewhen the dimmer circuit is or is not conducting by comparing the inputvoltage V_(IN) 310 to first reference V_(REF) 372. The amount of timewhich the input voltage V_(IN) 310 is above the first reference V_(REF)372 may correspond to the dimmer circuit conducting (and vice versa).Edge 367 illustrates a close to ideal response of the input voltageV_(IN) 310. As illustrated, edge 367 falls quickly to zero at time t₁374 and the input voltage V_(IN) 310 is less than the first referenceV_(REF) 372 at time t₁ 374. However, in general, the input voltageV_(IN) 310 does not fall to zero as quickly as illustrated by edge 367.Rather, the input voltage V_(IN) 310 may fall to zero as shown by edge368 due to leakage current of the dimmer circuit and input voltageV_(IN) 310 does not actually reach the first reference V_(REF) 372 untiltime t₂ 375, which is after the dimmer circuit has stopped conducting attime t₁ 374. In another example, the input voltage V_(IN) 310 may slowlydecrease once the dimmer circuit 104 stops conducting then quicklydecrease once the input current I_(IN) 315 has fallen below thethreshold I_(H) _(—) _(TH) 376 and the switch 140 of the bleeder circuit109 is turned on. As such, the input voltage V_(IN) 310 does notactually reach the first reference V_(REF) 372 until after time t₁ 374.As such, determining the dimmer circuit conduction may be less accurateutilizing threshold detection alone.

In examples of the present invention, the edge detection circuit 136 mayalso determine if an edge has occurred using the input current I_(IN)315. At the beginning of the half line cycle T_(HL) 313, the dimmercircuit 104 is conducting and the enable signal U_(EN) 360 is logic highand the bleeder control circuit 134 is enabled. The input current I_(IN)315 quickly rises to the threshold I_(H) _(—) _(TH) 376 and is clampedat the threshold I_(H) _(—) _(TH) 376 until there is enough inputvoltage V_(IN) 310 and the input current I_(IN) 315 substantiallyfollows the sinusoidal shape of the input voltage V_(IN) 310. At time t₁374, the dimmer circuit 104 stops conducting and the input currentI_(IN) 315 begins to respond to the lack of conduction by the dimmercircuit 104 by decreasing. As illustrated, the input current I_(IN) 315decreases much quicker than edge 368 of the input voltage V_(IN) 310, asillustrated. The edge detection circuit 136 may output the edge signalU_(EDGE) 364 in response to the input voltage V_(IN) 310, input currentI_(IN) 315 and the enable signal U_(EN) (not shown). Utilizing the inputvoltage V_(IN) 310 with edge 368, after time t₁ 374 and before time t₂375, the slope of the input voltage is negative and the input voltageV_(IN) 310 is greater than the first reference V_(REF) 372. The edgesignal U_(EDGE) 364 then transitions to a logic high value after theinput current I_(IN) 315 has fallen below the second reference I_(REF)377 (and the enable signal indicates that the bleeder circuit isenabled). As such, an edge is detected closer to time t₁ 374 as opposedto time t₂ 375.

FIG. 4 is a flow diagram illustrating an example process 400 fordetecting an edge in an input waveform in accordance with an example ofthe present invention. The order in which some or all of the processblocks appear in process 400 should not be deemed limiting. Rather, oneof ordinary skill in the art having the benefit of the presentdisclosure will understand that some of the process blocks may beexecuted in a variety of orders not illustrated, or even in parallel.

In process block 410, it is determined whether the bleeder circuit isenabled. If the bleeder circuit is not enabled, the process returns toprocess block 410. If the bleeder circuit is enabled, the processproceeds to block 415. In block 415, the input voltage sense signal(e.g. input voltage sense signal 142) is compared with a first reference(e.g. V_(REF) 372). If the input voltage sense signal is greater thanthe first reference, the process proceeds to block 420, otherwise theprocess returns to block 410. Continuing to block 420, the input currentsense signal (e.g. input current sense signal 142) is compared to asecond reference (e.g. I_(REF) 377). If the input current sense signalis less than the second reference, the process proceeds to block 425,otherwise the process returns to block 410. At block 425, it isdetermined if the input voltage sense signal has a negative slope. If nonegative slope is detected, then the process returns to block 410. Ifthe input voltage sense signal also has a negative slope, then processcontinues to block 430 where an edge signal asserts that an edge hasbeen detected.

FIG. 5 illustrates an example controller 530 including a drive circuit532, bleeder control circuit 534, and an edge detection circuit 536.Bleeder control circuit 534 is shown as including comparator 579,bleeder enable circuit 580, and AND gate 582. Edge detection circuit 536is shown as including comparators 583 and 584, slope sense circuit 585,an edge driver circuit 586, and a filter 587. In FIG. 5, edge drivercircuit 586 includes an AND gate. Further illustrated in FIG. 5 areinput voltage sense signal 542, input current sense signal 544, enablesignal U_(EN) 560, bleeder control signal U_(BLEED) 562, switch currentsense signal 558, feedback signal U_(FB) 552, and drive signal 570. Itshould be appreciated that similarly named and numbered elements coupleand function as described above.

Bleeder control circuit 534 is coupled to receive the input voltagesense signal 542 and input current sense signal 544. Comparator 579 iscoupled to receive the input current sense signal 544 at its invertinginput and the threshold I_(H) _(—) _(TH) 576 at its non-inverting input.In one example, the output of comparator 579 goes logic high when inputcurrent sense signal 544 is lower than threshold I_(H) _(—) _(TH) 576.The bleeder enable circuit 580 is coupled to receive the input voltagesense signal and output the enable signal U_(EN) 560. In one example,the enable signal U_(EN) 560 may be logic high when input voltage sensesignal 542 is less than first reference V_(REF) 572 for less than agiven amount of time. Once the enable signal U_(EN) 560 transitions to alogic high value, the enable signal U_(EN) 560 may remain at a logichigh value as long as an edge is detected. In another example, theenable signal U_(EN) 560 may be set to a logic high value to enable thebleeder at start-up of the controller and power converter. In anotherexample, the bleeder enable circuit 580 may output a logic high valuewhen a fast slope (negative or positive) is detected in the inputvoltage sense signal 542. The AND gate 582 is coupled to receive theoutput of comparator and the enable signal U_(EN) 560. The output of ANDgate 582 is the bleeder control signal U_(BLEED) 562. The enable signalU_(EN) 560 is also coupled to be received by the edge detection circuit536.

Edge detection circuit 536 is coupled to receive the input voltage sensesignal 542, the input current sense signal 544, and the enable signalU_(EN) 560. Comparator 584 is coupled to receive the input voltage sensesignal 542 at its non-inverting input and the first reference V_(REF)572 at its inverting input. Comparator 584 is coupled to assert a firstoutput signal 598 in response to input voltage sense signal 542 beinggreater than the first reference V_(REF) 572. Comparator 583 is coupledto receive the input current sense signal 544 at its inverting input andthe second reference I_(REF) 577 at its non-inverting input. Comparator583 is coupled to assert a second output signal 597 in response to inputcurrent sense signal 544 being less than the second reference I_(REF)577. Slope sense module 585 is illustrated as receiving the inputvoltage sense signal 542 and outputting slope signal 599 when inputvoltage sense signal 542 decreases over time. In one example, slopesense module 585 is a digital voltage tracker that samples input voltagesense signal 542 at a time interval and asserts slope signal 599 basedon analyzing the samples stored in slope sense module 585 over a timeperiod that is larger than the time interval (to allow slope sensemodule 585 to store multiple samples to analyze).

The AND gate of edge driver circuit 586 is illustrated as being coupledto receive the outputs of comparator 583 and 584, slope signal 599, andthe enable signal U_(EN) 560. The output of the AND gate is thenreceived by the filter 587. In one example, the output of the AND gateis the edge signal U_(EDGE) 564. The filter 587 may receive and delaythe edge signal U_(EDGE) 564 by the time threshold T_(TH) (illustratedas T_(TH) 378 in FIG. 3). Similar to what is described above, the drivecircuit 532 is coupled to receive the feedback signal 552, switchcurrent sense signal 558, the edge signal U_(EDGE) 564 to output thedrive signal 570 and control switching of the power switch.

In operation, the bleeder control circuit 534 controls switching of theswitch 140 of the bleeder 109. The bleeder control signal U_(BLEED) 562may be a rectangular pulse waveform with varying lengths of logic highand logic low sections. In one example, logic high corresponds toturning the switch 140 on while logic low corresponds to turning theswitch 140 off. When the input current sense signal 544 has gone belowthe threshold I_(H) _(—) _(TH) 576, the output of comparator 579 islogic high (indicating that the switch 140 of the bleeder 109 shouldturn on to provide additional current to keep the current in the dimmercircuit above the threshold). However, the bleeder control signalU_(BLEED) 562 does not transition to a logic high value unless theenable signal U_(EN) 560 is also logic high. In one example, the enablesignal U_(EN) 560 may be logic high when input voltage sense signal 542is less than first reference V_(REF) 572 for less than a given amount oftime. Once the enable signal U_(EN) 560 transitions to a logic highvalue, the enable signal U_(EN) 560 may remain at a logic high value aslong as an edge is detected. In another example, the enable signalU_(EN) 560 may be set to a logic high value to enable the bleeder atstart-up of the controller and power converter. In another example, thebleeder enable circuit 580 may output a logic high value when a fastslope (negative or positive) is detected in the input voltage sensesignal 542. The enable signal U_(EN) 560 may remain logic high as longas a dimmer circuit is detected.

Similarly, the edge signal U_(EDGE) 564 transitions to a logic highvalue indicating that an edge is detected when the inputs of the ANDgate of edge driver circuit 586 are logic high. Comparator 583 outputs alogic high value when the input current sense signal 544 is less thanthe second reference I_(REF) 577. Comparator 584 outputs a logic highvalue when the input voltage sense signal 542 is greater than the firstthreshold V_(REF) 572. Slope sense 585 is coupled to receive the inputvoltage sense signal 542 and determine if the input voltage V_(IN) has apositive or negative slope. For the example shown in FIG. 5, the outputof slope sense 585 is logic high when the input voltage V_(IN) has anegative slope. When each of these conditions occur, and the enablesignal U_(EN) 560 is asserted, the edge signal U_(EDGE) 564 indicatesthat an edge has been detected.

The above description of illustrated examples of the present invention,including what is described in the Abstract, are not intended to beexhaustive or to be limitation to the precise forms disclosed. Whilespecific embodiments of, and examples for, the invention are describedherein for illustrative purposes, various equivalent modifications arepossible without departing from the broader spirit and scope of thepresent invention. Indeed, it is appreciated that the specific examplevoltages, currents, frequencies, power range values, times, etc., areprovided for explanation purposes and that other values may also beemployed in other embodiments and examples in accordance with theteachings of the present invention.

What is claimed is:
 1. A controller for a power converter, thecontroller comprising: an edge detection circuit including: a firstcomparator coupled to assert a first output signal in response to avoltage sense signal being greater than a first reference, wherein thevoltage sense signal is representative of an input voltage of the powerconverter; a second comparator coupled to assert a second output signalin response to a current sense signal being less than a second referencedifferent from the first reference, wherein the current sense signal isrepresentative of a current through the power converter; a slope sensemodule coupled to assert a slope signal in response to the voltage sensesignal decreasing over time; and an edge driver circuit coupled togenerate an edge signal in response to assertions of the first outputsignal, the second output signal, the slope signal, and an enable signalreceived from a bleeder control circuit; and a drive circuit coupled tooutput a drive signal in response to the edge signal, wherein the drivesignal is for controlling a switch coupled to regulate an output of thepower converter.
 2. The controller of claim 1, wherein the controllerincludes the bleeder control circuit and the bleeder control circuitcomprises: a bleeder enable circuit coupled to generate the enablesignal in response to the voltage sense signal.
 3. The controller ofclaim 2, wherein the bleeder enable circuit further generates the enablesignal in response to the voltage sense signal being less than the firstreference for less than a given amount of time.
 4. The controller ofclaim 2, wherein the bleeder control circuit asserts a bleeder controlsignal when both (1) the current sense signal is lower than a thresholdand (2) the enable signal is asserted.
 5. The controller of claim 1,wherein the slope sense module includes a digital voltage trackercoupled to sample the voltage sense signal at a time interval and outputthe slope signal based on samples stored in the slope sense module thatwere sampled over a period of time larger than the time interval.
 6. Thecontroller of claim 1, wherein the edge driver circuit includes an ANDgate with four inputs coupled to receive the first output signal, thesecond output signal, the slope signal, and the enable signal.
 7. Aswitched mode power converter comprising: a switch; an energy transferelement coupled to the switch; and a controller coupled to the switch toregulate an output of the switched mode power converter, wherein thecontroller includes: a first comparator coupled to assert a first outputsignal in response to a voltage sense signal being greater than a firstreference, wherein the voltage sense signal is representative of aninput voltage of the switched mode power converter; a second comparatorcoupled to assert a second output signal in response to a current sensesignal being less than a second reference different from the firstreference, wherein the current sense signal is representative of acurrent through the switched mode power converter; a slope sense modulecoupled to assert a slope signal in response to the voltage sense signaldecreasing over time; and an edge driver circuit coupled to generate anedge signal in response to assertions of the first output signal, thesecond output signal, the slope signal, and an enable signal receivedfrom a bleeder control circuit; and a drive circuit coupled to output adrive signal in response to the edge signal, wherein the drive signal isfor controlling a switch coupled to regulate an output of the switchedmode power converter.
 8. The switched mode power converter of claim 7,wherein the slope sense module includes a digital voltage trackercoupled to sample the voltage sense signal at a time interval and outputthe slope signal based on samples stored in the slope sense module thatwere sampled over a period of time larger than the time interval.
 9. Theswitched mode power converter of claim 7, wherein the edge drivercircuit includes an AND gate with four inputs coupled to receive thefirst output signal, the second output signal, the slope signal, and theenable signal.
 10. The switched mode power converter of claim 7, whereinthe controller includes the bleeder control circuit and the bleedercontrol circuit comprises: a bleeder enable circuit coupled to generatethe enable signal in response to the voltage sense signal.
 11. Theswitched mode power converter of claim 10, wherein the bleeder enablecircuit further generates the enable signal in response to the voltagesense signal being less than the first reference for less than a givenamount of time.
 12. The switched mode power converter of claim 10,wherein the bleeder control circuit asserts a bleeder control signalwhen both (1) the current sense signal is lower than a threshold and (2)the enable signal is asserted.
 13. The switched mode power converter ofclaim 12 further comprising a bleed circuit coupled to draw current froman input of the switched mode power converter in response to receivingthe bleeder control signal.
 14. The switched mode power converter ofclaim 7 further comprising a sense circuit coupled to sense the outputof the switched mode power converter, wherein the drive circuit iscoupled to output the drive signal in response to a feedback signalreceived from the sense circuit.
 15. A method of operating a controllerof a power converter, the method comprising: comparing a voltage sensesignal to a first reference, wherein the voltage sense signal isrepresentative of an input voltage of the power converter; comparing acurrent sense signal to a second reference, wherein the current sensesignal is representative of a current through the power converter;measuring a slope of the voltage sense signal over time; asserting anedge detection signal when (1) the voltage sense signal is larger thanthe first reference, (2) the current sense signal is lower than thesecond reference, and (3) the slope is a negative slope.
 16. The methodof claim 15 further comprising: detecting whether a dimming circuit ismodulating the voltage sense signal, wherein the edge detection signalis only asserted when the dimming circuit is detected.
 17. The method ofclaim 15 further comprising: outputting a drive signal in response tothe edge detection signal being asserted, the drive signal forcontrolling a switch of the power converter.
 18. The method of claim 15further comprising: asserting a bleeder control signal when (1) anenable signal is asserted and (2) the current sense signal is lower thana threshold, wherein the enable signal is generated in response to thevoltage sense signal.
 19. The method of claim 18 further comprising:drawing current from an input of the power converter in response to thebleeder control signal being asserted.